package vehicleRentSys;

public class Bus extends MotoVehicle {

	private int seatCount; // 座位数

	public Bus() {

	}

	public Bus(String brand, String vehicleID, int perRent, int seatCount) {
		super(brand, vehicleID, perRent);
		this.seatCount = seatCount;
	}

	public int getSeatCount() {
		return seatCount;
	}

	public void setSeatCount(int seatCount) {
		this.seatCount = seatCount;
	}

	// 计算客车的租金（）重写了MotoVehicle的计算租金方法
	/*
	 * days>=3天：9折 
	 * days>=7天：8折 
	 * days>=30天：7折 
	 * days>=150天：6折
	 */
	public double calcRent(int days) {
		double price = this.getPerRent() * days;
		if (days >= 3 && days < 7) {
			price = price * 0.9;
		} else if (days >= 7 && days < 30) {
			price = price * 0.8;
		} else if (days >= 30 && days < 150) {
			price = price * 0.7;
		} else if (days >= 150) {
			price = price * 0.6;
		}
		return price;
	}

}
